<template>
  <H1>About Page {{ id }}</H1>
</template>

<script>
  export default {
    data() {
      return {
        id: 0
      }
    },

    mounted() {
      this.id = this.$route.query.id
      console.log(this.$route.params.x)
    },

    // 组件内部守卫, 只适用于动态组件
    beforeRouteUpdate(to, from, next) {
      // next()
    },

    beforeRouteEnter (to, from, next) {
      // ...
      next()
    }
  }
</script>